import request from '@/utils/request'

export function getData() {
  return request({
    url: '/system/tower/monitoring/1',
    method: 'get'
  })
}
export function listEquipment(query) {
  return request({
    url: '/system/equipment/list',
    method: 'get',
    params: query
  })
}
export function listDip(query) {
  return request({
    url: '/system/dip/list',
    method: 'get',
    params: query
  })
}
export function equipmentState(query) {
  return request({
    url: '/system/equipment',
    method: 'put',
    data: query
  })
}
export function getState(query) {
  return request({
    url: '/system/equipment/'+query,
    method: 'get',
  })
}

export function getToday() {
  return request({
    url: '/system/alarm/totalByDay',
    method: 'get',
  })
}

export function getTop() {
  return request({
    url: '/system/alarm/topByDay',
    method: 'get',
  })
}

export function getAlarm() {
  return request({
    url: '/system/alarm/alarmByDay',
    method: 'get',
  })
}

export function getByDay() {
  return request({
    url: '/system/alarm/countByDay',
    method: 'get'
  })
}

export function postData(data) {
  return request({
    url: '',
    method: 'post',
    data: data
  })
}